<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" data-th-href="@{assets/css/layui.css}">
    <link rel="stylesheet" data-th-href="@{assets/css/view.css}"/>
    <title></title>
</head>
<div data-th-include="common/common"></div>
<body class="layui-view-body">
<div class="layui-content">
    <div class="layui-row">
        <div class="layui-card">
            <div style="padding-top:10px;margin: 0 10px 0 10px">
                <form class="layui-form role-table-form" action="">
                    <div class="row conditionTb" >
                        <div class="col-sm-12 m-b-xs">
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input form-control" name="roleName" placeholder="输入角色名"/>
                            </div>
                            <button type="button" class="layui-btn layui-btn-blue" onclick="search()"> 查询</button>
                            <div class="actions__item zmdi zmdi-refresh-alt" onclick="refresh()" title="刷新" ></div>
                            <div class="dropdown actions__item">
                                <i data-toggle="dropdown" class="zmdi zmdi-download"> </i>
                                <ul class="dropdown-menu dropdown-menu-right">
                                    <a href="javascript:void(0)" class="dropdown-item" data-table-action="excel" onclick="exportUserExcel()">
                                        Excel (.xlsx) </a>
                                    <a href="javascript:void(0)" class="dropdown-item" data-table-action="csv" onclick="exportUserCsv()"> CSV
                                        (.csv) </a>
                                </ul>
                            </div>
                            <div class="dropdown actions__item" shiro:hasAnyPermissions="role:add,role:delete,role:update">
                                <i data-toggle="dropdown" class="zmdi zmdi-more-vert"></i>
                                <div class="dropdown-menu dropdown-menu-right">
                                    <a href="javascript:void(0)" class="dropdown-item" data-toggle="modal" data-target="#role-add" shiro:hasPermission="role:add">新增角色</a>
                                    <a href="javascript:void(0)" class="dropdown-item" onclick="updateRole()" shiro:hasPermission="role:update">修改角色</a>
                                    <a href="javascript:void(0)" class="dropdown-item" onclick="deleteRoles()" shiro:hasPermission="role:delete">删除角色</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
                <table id="roleTable" data-mobile-responsive="true" class="mb-bootstrap-table text-nowrap"></table>
            </div>
        </div>
    </div>
</div>
<div data-th-include="system/role/roleAdd"></div>
<script data-th-src="@{assets/layui.all.js}"></script>
<script>
    var form = layui.form
        ,layer = layui.layer;
</script>
</body>
</html>
<script data-th-src="@{js/app/system/role/role.js}"></script>
<script data-th-src="@{js/app/system/role/roleEdit.js}"></script>